/*
 * Selling Partner API for Replenishment
 * The Selling Partner API for Replenishment (Replenishment API) provides programmatic access to replenishment program metrics and offers. These programs provide recurring delivery of any replenishable item at a frequency chosen by the customer.  The Replenishment API is available worldwide wherever Amazon Subscribe & Save is available or is supported. The API is available to vendors and FBA selling partners.
 *
 * OpenAPI spec version: 2022-11-07
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */

package software.amazon.spapi.models.replenishment.v2022_11_07;

import com.google.gson.annotations.SerializedName;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.ArrayList;
import java.util.List;
import java.util.Objects;

/** An object which contains details about an offer. */
@Schema(description = "An object which contains details about an offer.")
public class ListOffersResponseOffer {
    @SerializedName("sku")
    private String sku = null;

    @SerializedName("asin")
    private String asin = null;

    @SerializedName("marketplaceId")
    private String marketplaceId = null;

    @SerializedName("eligibility")
    private EligibilityStatus eligibility = null;

    @SerializedName("offerProgramConfiguration")
    private OfferProgramConfiguration offerProgramConfiguration = null;

    @SerializedName("programType")
    private ProgramType programType = null;

    @SerializedName("vendorCodes")
    private List<String> vendorCodes = null;

    public ListOffersResponseOffer sku(String sku) {
        this.sku = sku;
        return this;
    }

    /**
     * The SKU. This property is only supported for sellers and not for vendors.
     *
     * @return sku
     */
    @Schema(description = "The SKU. This property is only supported for sellers and not for vendors.")
    public String getSku() {
        return sku;
    }

    public void setSku(String sku) {
        this.sku = sku;
    }

    public ListOffersResponseOffer asin(String asin) {
        this.asin = asin;
        return this;
    }

    /**
     * The Amazon Standard Identification Number (ASIN).
     *
     * @return asin
     */
    @Schema(description = "The Amazon Standard Identification Number (ASIN).")
    public String getAsin() {
        return asin;
    }

    public void setAsin(String asin) {
        this.asin = asin;
    }

    public ListOffersResponseOffer marketplaceId(String marketplaceId) {
        this.marketplaceId = marketplaceId;
        return this;
    }

    /**
     * Get marketplaceId
     *
     * @return marketplaceId
     */
    @Schema(description = "")
    public String getMarketplaceId() {
        return marketplaceId;
    }

    public void setMarketplaceId(String marketplaceId) {
        this.marketplaceId = marketplaceId;
    }

    public ListOffersResponseOffer eligibility(EligibilityStatus eligibility) {
        this.eligibility = eligibility;
        return this;
    }

    /**
     * Get eligibility
     *
     * @return eligibility
     */
    @Schema(description = "")
    public EligibilityStatus getEligibility() {
        return eligibility;
    }

    public void setEligibility(EligibilityStatus eligibility) {
        this.eligibility = eligibility;
    }

    public ListOffersResponseOffer offerProgramConfiguration(OfferProgramConfiguration offerProgramConfiguration) {
        this.offerProgramConfiguration = offerProgramConfiguration;
        return this;
    }

    /**
     * Get offerProgramConfiguration
     *
     * @return offerProgramConfiguration
     */
    @Schema(description = "")
    public OfferProgramConfiguration getOfferProgramConfiguration() {
        return offerProgramConfiguration;
    }

    public void setOfferProgramConfiguration(OfferProgramConfiguration offerProgramConfiguration) {
        this.offerProgramConfiguration = offerProgramConfiguration;
    }

    public ListOffersResponseOffer programType(ProgramType programType) {
        this.programType = programType;
        return this;
    }

    /**
     * Get programType
     *
     * @return programType
     */
    @Schema(description = "")
    public ProgramType getProgramType() {
        return programType;
    }

    public void setProgramType(ProgramType programType) {
        this.programType = programType;
    }

    public ListOffersResponseOffer vendorCodes(List<String> vendorCodes) {
        this.vendorCodes = vendorCodes;
        return this;
    }

    public ListOffersResponseOffer addVendorCodesItem(String vendorCodesItem) {
        if (this.vendorCodes == null) {
            this.vendorCodes = new ArrayList<String>();
        }
        this.vendorCodes.add(vendorCodesItem);
        return this;
    }

    /**
     * A list of vendor codes associated with the offer.
     *
     * @return vendorCodes
     */
    @Schema(description = "A list of vendor codes associated with the offer.")
    public List<String> getVendorCodes() {
        return vendorCodes;
    }

    public void setVendorCodes(List<String> vendorCodes) {
        this.vendorCodes = vendorCodes;
    }

    @Override
    public boolean equals(java.lang.Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }
        ListOffersResponseOffer listOffersResponseOffer = (ListOffersResponseOffer) o;
        return Objects.equals(this.sku, listOffersResponseOffer.sku)
                && Objects.equals(this.asin, listOffersResponseOffer.asin)
                && Objects.equals(this.marketplaceId, listOffersResponseOffer.marketplaceId)
                && Objects.equals(this.eligibility, listOffersResponseOffer.eligibility)
                && Objects.equals(this.offerProgramConfiguration, listOffersResponseOffer.offerProgramConfiguration)
                && Objects.equals(this.programType, listOffersResponseOffer.programType)
                && Objects.equals(this.vendorCodes, listOffersResponseOffer.vendorCodes);
    }

    @Override
    public int hashCode() {
        return Objects.hash(sku, asin, marketplaceId, eligibility, offerProgramConfiguration, programType, vendorCodes);
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("class ListOffersResponseOffer {\n");

        sb.append("    sku: ").append(toIndentedString(sku)).append("\n");
        sb.append("    asin: ").append(toIndentedString(asin)).append("\n");
        sb.append("    marketplaceId: ").append(toIndentedString(marketplaceId)).append("\n");
        sb.append("    eligibility: ").append(toIndentedString(eligibility)).append("\n");
        sb.append("    offerProgramConfiguration: ")
                .append(toIndentedString(offerProgramConfiguration))
                .append("\n");
        sb.append("    programType: ").append(toIndentedString(programType)).append("\n");
        sb.append("    vendorCodes: ").append(toIndentedString(vendorCodes)).append("\n");
        sb.append("}");
        return sb.toString();
    }

    /** Convert the given object to string with each line indented by 4 spaces (except the first line). */
    private String toIndentedString(java.lang.Object o) {
        if (o == null) {
            return "null";
        }
        return o.toString().replace("\n", "\n    ");
    }
}
